#pragma once

#define STR_CONFIG "esperanza_config"
#define STR_AUTOSNIFFINGFILESIZELBOUND "auto_sniffing_file_size_lbound"
#define STR_AUTOSNIFFINGFILEEXT "auto_sniffing_file_ext"
#define STR_FILEEXT "ext"
#define STR_DEFAULTDOWNLOADINGDIR "default_download_directory"

class CConfigurationManager
{
public:
	CConfigurationManager(void);
	~CConfigurationManager(void);
public:
	BOOL LoadConfig(CString strFilePath);
	BOOL SaveConfig(CString strFilepath);
private:
	DWORD m_uAutoSniffingFileSizeLowerBound;
	CList<CString, CString&> m_lstAutoSniffingFileExt;
	CString m_strDefaultDownloadDir;
public:
	BOOL SniffFileOrNot(CString strFilename);
	BOOL SniffFileOrNot(DWORD uFileSize);
	VOID GetDefaultDownloadDir(CString& strPath);
};

